#include "StdAfx.h"
#include "ColorConfig.h"
#include "..\ConfigUtility\Include\ColorMgr.h"

CColorConfig::CColorConfig(void)
{
}


CColorConfig::~CColorConfig(void)
{
}

void CColorConfig::SetListCtrl( CGuiGridCtrl& listCtrl, int iItemHeight /*= 24 */ )
{
	listCtrl.SetTextFormat(DT_RIGHT|DT_SINGLELINE|DT_VCENTER);
	listCtrl.SetBkColor(g_Color->GetCtrlColor("ListClrSet", "GridListBk"));
	listCtrl.SetTextColor(g_Color->GetCtrlColor("ListClrSet", "GridListText"));
	listCtrl.SetSelectedColor(g_Color->GetCtrlColor("ListClrSet", "GridListSelBk"));

	listCtrl.SetItemHeight(iItemHeight);
	listCtrl.SetEvenColor(g_Color->GetCtrlColor("ListClrSet", "GridListBk1"));
	listCtrl.SetOddColor(g_Color->GetCtrlColor("ListClrSet", "GridListBk2"));
	listCtrl.SetBorderColor(g_Color->GetCtrlColor("ListClrSet", "GridListBorder"));

	((CGuiGridHeaderCtrl*)listCtrl.GetHeaderCtrl())->SetTextColor(
		g_Color->GetCtrlColor("ListClrSet", "GridHeadText"));
	((CGuiGridHeaderCtrl*)listCtrl.GetHeaderCtrl())->SetBkgndColor(
		g_Color->GetCtrlColor("ListClrSet", "GridHeadBk"));
	((CGuiGridHeaderCtrl*)listCtrl.GetHeaderCtrl())->SetSplitterColor(
		g_Color->GetCtrlColor("ListClrSet", "GridHeadSplitter"));
}

//CColorConfig& CColorConfig::GetInstance()
//{
//	static CColorConfig clrcfg;
//	return clrcfg;
//}



